package Day09;

import java.io.ObjectInputStream;
import java.util.InputMismatchException;
import java.util.Scanner;

public class Texxt2 {
    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {

        calculate();
    }

    public static void calculate() throws ArithmeticException, InputMismatchException {
        int number1 = GetNumber();
        int number2 = GetNumber();

        if(number2 ==  0){
            ArithmeticException e = new ArithmeticException("除法运算中除数不能 为零");
            throw e;
        }
        int result = number1 / number2;
        System.out.println(result);

    }


    public static int GetNumber() throws InputMismatchException{
        System.out.println("请输入数字");
        int number = sc.nextInt();
        return number;
    }



}
